<!DOCTYPE htm PUBLIC "-//W3C//DTD Xhtm 1.0 Transitional//EN" "DTD/xhtm1-transitional.dtd">
<htm xmlns="http://www.w3.org/1999/xhtm" xml:lang="de" lang="de">
<head>
 <meta http-equiv="content-type" content="text/htm; charset=iso-8859-1" />
 <meta http-equiv="content-style-type" content="text/css" />
 <meta name="author" content="Arlsair" />
 <meta name="date" content="2004-01-22" />
 <title>AddGrain</title>
 <link rel="stylesheet" type="text/css" href="../../style.css" />
</head><body>
<h1>AddGrain</h1>

<h2>&Uuml;bersicht</h2>
<b>Autor:</b> Tom Barry<br />
<b>Version:</b> 0.1.0.0<br />
<b>Download:</b> <a href="http://mywebpages.comcast.net/trbarry/downloads.htm" target="_blank">http://mywebpages.comcast.net/trbarry/downloads.htm</a><br />
<b>Kategorie:</b> Verschiedenes<br />
<b>Anforderungen:</b> YV12 Farbformat<br />
<hr>
<h2>Description</h2>
<p>AddGrain generates film like grain or other effects (like rain) by adding
random noise to a video clip. This noise may optionally be horizontally or
vertically correlated to cause streaking.</p>
<h3>Usage</h3>
<p>1) Place the AddGrain.dll in a directory somewhere. If that is the C:\Program
Files\AviSynth 2.5\plugins folder folder (recommended) then you can omit the
LoadPlugin command in your script. In your Avisynth file use commands similar to
</p>
<p>LoadPlugin(&quot;F:\AddGrain\AddGrain.dll&quot;) <br>
Avisource(&quot;D:\wherever\myfile.avi&quot;)<br>
AddGrain(20,0,0) </p>
<p>Of course replace the file and directory names with your own. </p>
<h3><b>P</b><b>arameters</b></h3>
<p>AddGrain(float stddev, float HorizCorr, float VerticalCorr) </p>
<p>where: </p>
<p><b>stddev</b> = the standard deviation of the noise generated. </p>
<p><b>HorizCorr</b> = the horizontal correlation factor, causing horizontal
steaking. (0.0 to 1.0) </p>
<p><b>VerticalCorr</b> = the vertical correlation factor. (0.0 to 1.0) </p>
<p>The correlation factors are actually just implemented as exponential
smoothing which give a weird side affect that I did not attempt to adjust. But
this means that as you increase either corr factor you will have to also
increase the stddev (grain amount) in order to get the same visible amount of
grain, since it is being smooth out a bit.</p>
<p>Increase both corr factors can somewhat give clumps, or larger grain size. </p>
<p>And there is an interesting effect with, say, AddGrain(800,0,.9) or any huge
amount of strongly vertical grain. It can make any scene look like it is
raining.</p>
</html>
